import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Portal",
    component: () => import("@/views/Home"),
    meta: {
      title: "Portal",
      hidden: false,
    },
  },
  // 可以在这里添加更多路由
  {
    path: "/planning",
    name: "Planning",
    component: () => import("@/views/Planning"),
    meta: {
      title: "Planning",
      hidden: false,
    },
  },
  {
    path: "/editor",
    name: "Editor",
    meta: {
      title: "Editor",
      hidden: false,
    },
    children: [
      {
        path: "/editor/staff",
        name: "StaffEditor",
        component: () => import("@/views/Editor/StaffEditor"),
        meta: {
          title: "Staff Editor",
          hidden: false,
        },
      },
      {
        path: "/editor/task",
        name: "TaskEditor",
        component: () => import("@/views/Editor/TaskEditor"),
        meta: {
          title: "Task Editor",
          hidden: false,
        },
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
